<template>
  <el-pagination background
                 :current-page="current"
                 :page-size="size"
                 :total="total"
                 layout="prev, pager, next"
                 style="margin: -10px;"
                 @current-change="handleCurrentChange" />
</template>

<script>
export default {
  props: {
    current: {
      default: 1,
      type: Number
    },
    size: {
      default: 10,
      type: Number
    },
    total: {
      default: 0,
      type: Number
    }
  },
  methods: {
    handleCurrentChange(val) {
      this.$emit('change', {
        current: val,
        size: this.size,
        total: this.total
      })
    }
  }
}
</script>
